﻿namespace DI_test;

public class Computer(IVideoAdapter videoAdapter, IProcessor processor)
{
    public IOs Os { get; set; }
    private IVideoAdapter videoAdapter = videoAdapter;
    private IProcessor processor = processor;

    public void On(){
        Os.On();
        Console.WriteLine(videoAdapter.ViewPicture());
        Thread.Sleep(1000);
        Console.WriteLine(processor.HardWorking("write file"));
        Thread.Sleep(1000);
    }

    public void Off(){
        Os.Off();
        Console.Clear();
    }
}
